POV-Ray : Newsgroups : povray.general : Scaling macros? : Re: Scaling macros? Server Time
4 Aug 2024 04:19:13 EDT (-0400)
  Re: Scaling macros?  
From: gonzo
Date: 29 Jul 2003 17:05:01
Message: <web.3f26e01d9c12b543a0c272b50@news.povray.org>
John VanSickle wrote:
>Let's say I design a scene using centimeters.  You design a model using
>meters, or some English unit.
>
>Who would find a set of relatively automatic scale converters
>useful?
>
>The way I envision them, the scene builder calls one macro early in
>the scene:
>
>  ExpectMeters()
>
>while the model maker calls another macro in their code:
>
>union {
>  sphere { pHere,rSize }
>  // etc
>
>  UseCentimeters()
>}
>
>The two macros work together to make sure that the latter item is
>scaled properly (in this example, by 1/100).
>


Well, being UScentric, I have been using (usually) 1 pov unit = 1 Ft.  I
don't usually use other people's models so haven't had a problem, but as my
model collection grows I've been thinking about posting some of them to the
Pov-Ray object library, so I suppose others might find that useful.

I usually do basically what Chris described, defining my units at the start
of the file like #declare Ft = 1; #declare In = Ft/12; etc and using
something like 'translate x*14.25*Ft' or '#declare Rad = 5.5*In'.  Not sure
how your macro would handle that.

But this is something I have been wondering myself, how others deal with
different scalings and unit sizes.  I've tried to keep all of mine together
and right at the top of the file so if someone wanted to do their own
conversion it shouldn't be too difficult.

How do all you POV masters handle your units?

RG


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.